\(\int \csc ^2(a+b x) \sqrt {\sin (2 a+2 b x)} \, dx\) [109]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [C] (verification not implemented)
   Sympy [F(-1)]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 22, antiderivative size = 44 \[ \int \csc ^2(a+b x) \sqrt {\sin (2 a+2 b x)} \, dx=-\frac {2 E\left (\left .a-\frac {\pi }{4}+b x\right |2\right )}{b}-\frac {\csc ^2(a+b x) \sin ^{\frac {3}{2}}(2 a+2 b x)}{b} \]

[Out]

2*(sin(a+1/4*Pi+b*x)^2)^(1/2)/sin(a+1/4*Pi+b*x)*EllipticE(cos(a+1/4*Pi+b*x),2^(1/2))/b-csc(b*x+a)^2*sin(2*b*x+
2*a)^(3/2)/b

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {4385, 2719} \[ \int \csc ^2(a+b x) \sqrt {\sin (2 a+2 b x)} \, dx=-\frac {2 E\left (\left .a+b x-\frac {\pi }{4}\right |2\right )}{b}-\frac {\sin ^{\frac {3}{2}}(2 a+2 b x) \csc ^2(a+b x)}{b} \]

[In]

Int[Csc[a + b*x]^2*Sqrt[Sin[2*a + 2*b*x]],x]

[Out]

(-2*EllipticE[a - Pi/4 + b*x, 2])/b - (Csc[a + b*x]^2*Sin[2*a + 2*b*x]^(3/2))/b

Rule 2719

Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{
c, d}, x]

Rule 4385

Int[((e_.)*sin[(a_.) + (b_.)*(x_)])^(m_)*((g_.)*sin[(c_.) + (d_.)*(x_)])^(p_), x_Symbol] :> Simp[(e*Sin[a + b*
x])^m*((g*Sin[c + d*x])^(p + 1)/(2*b*g*(m + p + 1))), x] + Dist[(m + 2*p + 2)/(e^2*(m + p + 1)), Int[(e*Sin[a
+ b*x])^(m + 2)*(g*Sin[c + d*x])^p, x], x] /; FreeQ[{a, b, c, d, e, g, p}, x] && EqQ[b*c - a*d, 0] && EqQ[d/b,
 2] &&  !IntegerQ[p] && LtQ[m, -1] && NeQ[m + 2*p + 2, 0] && NeQ[m + p + 1, 0] && IntegersQ[2*m, 2*p]

Rubi steps \begin{align*} \text {integral}& = -\frac {\csc ^2(a+b x) \sin ^{\frac {3}{2}}(2 a+2 b x)}{b}-2 \int \sqrt {\sin (2 a+2 b x)} \, dx \\ & = -\frac {2 E\left (\left .a-\frac {\pi }{4}+b x\right |2\right )}{b}-\frac {\csc ^2(a+b x) \sin ^{\frac {3}{2}}(2 a+2 b x)}{b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.28 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.84 \[ \int \csc ^2(a+b x) \sqrt {\sin (2 a+2 b x)} \, dx=-\frac {2 \left (E\left (\left .a-\frac {\pi }{4}+b x\right |2\right )+\cot (a+b x) \sqrt {\sin (2 (a+b x))}\right )}{b} \]

[In]

Integrate[Csc[a + b*x]^2*Sqrt[Sin[2*a + 2*b*x]],x]

[Out]

(-2*(EllipticE[a - Pi/4 + b*x, 2] + Cot[a + b*x]*Sqrt[Sin[2*(a + b*x)]]))/b

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(175\) vs. \(2(67)=134\).

Time = 4.16 (sec) , antiderivative size = 176, normalized size of antiderivative = 4.00

method result size
default \(\frac {2 \sqrt {\sin \left (2 x b +2 a \right )+1}\, \sqrt {-2 \sin \left (2 x b +2 a \right )+2}\, \sqrt {-\sin \left (2 x b +2 a \right )}\, \operatorname {EllipticE}\left (\sqrt {\sin \left (2 x b +2 a \right )+1}, \frac {\sqrt {2}}{2}\right )-\sqrt {\sin \left (2 x b +2 a \right )+1}\, \sqrt {-2 \sin \left (2 x b +2 a \right )+2}\, \sqrt {-\sin \left (2 x b +2 a \right )}\, \operatorname {EllipticF}\left (\sqrt {\sin \left (2 x b +2 a \right )+1}, \frac {\sqrt {2}}{2}\right )-2 \cos \left (2 x b +2 a \right )^{2}-2 \cos \left (2 x b +2 a \right )}{\cos \left (2 x b +2 a \right ) \sqrt {\sin \left (2 x b +2 a \right )}\, b}\) \(176\)

[In]

int(csc(b*x+a)^2*sin(2*b*x+2*a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/cos(2*b*x+2*a)/sin(2*b*x+2*a)^(1/2)*(2*(sin(2*b*x+2*a)+1)^(1/2)*(-2*sin(2*b*x+2*a)+2)^(1/2)*(-sin(2*b*x+2*a)
)^(1/2)*EllipticE((sin(2*b*x+2*a)+1)^(1/2),1/2*2^(1/2))-(sin(2*b*x+2*a)+1)^(1/2)*(-2*sin(2*b*x+2*a)+2)^(1/2)*(
-sin(2*b*x+2*a))^(1/2)*EllipticF((sin(2*b*x+2*a)+1)^(1/2),1/2*2^(1/2))-2*cos(2*b*x+2*a)^2-2*cos(2*b*x+2*a))/b

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.10 (sec) , antiderivative size = 155, normalized size of antiderivative = 3.52 \[ \int \csc ^2(a+b x) \sqrt {\sin (2 a+2 b x)} \, dx=\frac {-i \, \sqrt {2 i} E(\arcsin \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right )\,|\,-1) \sin \left (b x + a\right ) + i \, \sqrt {-2 i} E(\arcsin \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right )\,|\,-1) \sin \left (b x + a\right ) + i \, \sqrt {2 i} F(\arcsin \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right )\,|\,-1) \sin \left (b x + a\right ) - i \, \sqrt {-2 i} F(\arcsin \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right )\,|\,-1) \sin \left (b x + a\right ) - 2 \, \sqrt {2} \sqrt {\cos \left (b x + a\right ) \sin \left (b x + a\right )} \cos \left (b x + a\right )}{b \sin \left (b x + a\right )} \]

[In]

integrate(csc(b*x+a)^2*sin(2*b*x+2*a)^(1/2),x, algorithm="fricas")

[Out]

(-I*sqrt(2*I)*elliptic_e(arcsin(cos(b*x + a) + I*sin(b*x + a)), -1)*sin(b*x + a) + I*sqrt(-2*I)*elliptic_e(arc
sin(cos(b*x + a) - I*sin(b*x + a)), -1)*sin(b*x + a) + I*sqrt(2*I)*elliptic_f(arcsin(cos(b*x + a) + I*sin(b*x
+ a)), -1)*sin(b*x + a) - I*sqrt(-2*I)*elliptic_f(arcsin(cos(b*x + a) - I*sin(b*x + a)), -1)*sin(b*x + a) - 2*
sqrt(2)*sqrt(cos(b*x + a)*sin(b*x + a))*cos(b*x + a))/(b*sin(b*x + a))

Sympy [F(-1)]

Timed out. \[ \int \csc ^2(a+b x) \sqrt {\sin (2 a+2 b x)} \, dx=\text {Timed out} \]

[In]

integrate(csc(b*x+a)**2*sin(2*b*x+2*a)**(1/2),x)

[Out]

Timed out

Maxima [F]

\[ \int \csc ^2(a+b x) \sqrt {\sin (2 a+2 b x)} \, dx=\int { \csc \left (b x + a\right )^{2} \sqrt {\sin \left (2 \, b x + 2 \, a\right )} \,d x } \]

[In]

integrate(csc(b*x+a)^2*sin(2*b*x+2*a)^(1/2),x, algorithm="maxima")

[Out]

integrate(csc(b*x + a)^2*sqrt(sin(2*b*x + 2*a)), x)

Giac [F]

\[ \int \csc ^2(a+b x) \sqrt {\sin (2 a+2 b x)} \, dx=\int { \csc \left (b x + a\right )^{2} \sqrt {\sin \left (2 \, b x + 2 \, a\right )} \,d x } \]

[In]

integrate(csc(b*x+a)^2*sin(2*b*x+2*a)^(1/2),x, algorithm="giac")

[Out]

integrate(csc(b*x + a)^2*sqrt(sin(2*b*x + 2*a)), x)

Mupad [F(-1)]

Timed out. \[ \int \csc ^2(a+b x) \sqrt {\sin (2 a+2 b x)} \, dx=\int \frac {\sqrt {\sin \left (2\,a+2\,b\,x\right )}}{{\sin \left (a+b\,x\right )}^2} \,d x \]

[In]

int(sin(2*a + 2*b*x)^(1/2)/sin(a + b*x)^2,x)

[Out]

int(sin(2*a + 2*b*x)^(1/2)/sin(a + b*x)^2, x)